Learn R Programming

pracma (version 1.5.8)

cd, pwd, what: Directory Functions (Matlab style)

Description

Displays or changes working directory, or lists files therein.

Usage

cd(dname)
pwd()

what(dname = getwd())

Arguments

dname
(relative or absolute) directory path.

Value

  • Name of the current working directory.

Details

pwd() displays the name of the current directory, and is the same as cd(). cd(dname) changes to directory dname and if successfull displays the directory name.

what() lists all files in a directory.

See Also

getwd, setwd, list.files

Examples

Run this code
# cd()
# pwd()
# what()

Run the code above in your browser using DataLab